package com.originalpoint.origin_server.aspect;

import com.originalpoint.origin_server.controller.UserController;
import com.originalpoint.origin_server.mapper.UserMapper;
import com.originalpoint.origin_server.pojo.Address;
import com.originalpoint.origin_server.service.UserService;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.lang.reflect.Field;

/**
 *完成o_addressId和totalPrice的传递
 */
@Component
@Aspect
public class UserAspect {
    @Autowired
    private UserService userService;
    private UserMapper userMapper;

    public UserAspect(){}

    public UserAspect(UserService userService) {
        this.userService = userService;
    }

    //    指定切点
    @Pointcut("@annotation(com.originalpoint.origin_server.annotations.UserAnnotation)")
    public void useraspect(){}

//    @Before("useraspect()")
//    public Double getMoney(Double price,Integer quantityOrdered)  {
//        userService.sendParam(price,quantityOrdered);
//
//    }



}
